{% extends ext_tpl %}
{% block style %}
	<link href="/css/report.css" rel="stylesheet" type="text/css" />
	{{ block.super }}
{% endblock %}

{% block header %}
<h1>Список должников</h1>
{% if byte %}
<h4>Фильтр: наименование начинается с буквы &lsquo;{{byte}}&rsquo; </h4>
{% endif %}
{% endblock %}

{% block text %}
{% load pagination_tags %}
<div class="report">
	<div class="ind">
		<div class="clirep">
				<table class="debtor">
					<tr class="head">
						<th><a href = "/debts/debtor/">Должник</a></th>
						<th class="inn"><a href = "/debts/debtor/inn/">ИНН</a></th>
						<th class="city"><a href = "/debts/debtor/city/">Регион</a></th>
					</tr>
				</table>
{% autopaginate debts 20 %}
		{% for deb in debts %}
				
				<table class="debtor">
					<tr>
						<td><a href = "/firm/{{deb.debtor.id}}/">{{deb.debtor.name}}</a></td>
						<td class="inn">{{deb.debtor.inn}}</td>
						<td class="city">{{deb.debtor.city}}</td>
					</tr>
				</table>

			<div class="debrep">
					<table class="details" border="0" >
						<tr class="head">
							<th><a href = "/debts/debt_date/">Дата</a></th>
							<th><a href = "/debts/creditor/name/">Кредитор</a></th>
							<th><a href = "/debts/summa/">Сумма</a></th>
							<th><a href = "/debts/tested/">Пров.</a></th>
							<th><a href = "/debts/paid/">Опл.</a></th>
							<th></th>
						</tr>
						<tr>
							<td class="date">{{deb.debt_date|date:"j.m.Y"}}</td>
							<td><a href="/firm/{{deb.creditor.id}}/">{{deb.creditor.name}}</a></td>
							<td class="type">{{deb.summa}}&nbsp;{{deb.currency}}</td>
							<td class="tested">
								{% if deb.tested %}
								+
								{% else %}
								-								
								{% endif %}
							</td>
							<td class="tested">
								{% if deb.paid %}
								+
								{% else %}
								-
								{% endif %}
							</td>
							<td class="dalee"><a href="/debt/{{deb.id}}">Подробнее</a></td>
						</tr>
					</table>
			</div>
		{% endfor %}
{% paginate %}
		</div>
	</div>
</div>

{% endblock %}

{% block left_center %}
<div class="abc">
{% for a in abc%}
<a href="/abc/{{a.0}}/">{{a.1}}</a>&nbsp;
{% endfor %}
</div>
{{block.super}}
{% endblock %}

